home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / edit / me_cd25.zip / MUTT2.ZIP / MIN.MUT < prev    next >
Lisp/Scheme  |  1992-11-09  |  261b  |  13 lines

  1.   ;; min.mut : find the the minimum of a list of numbers
  2.   ;; eg (min 1 2 3 4 5) returns 1
  3.   ;; C Durland    Public Domain
  4.  
  5. (defun min HIDDEN
  6. {
  7.   (int n i)
  8.  
  9.   (n (arg (i (- (nargs) 1))))
  10.   (while (>= (-= i 1) 0) (if (< (arg i) n) (n (arg i))) )
  11.   n
  12. })
  13.